<?php 
 require_once('nav.php');
require_once('inc_admin.php');
connect();
$search=$_GET['search'];

$sql="select * from users where uname like '%{$search}%' ";
$re=mysql_query($sql) or die('查询失败！'.mysql_error());

 ?>
   <center><h>用户注册列表</h></center>
   <table class="table table-hover">
   <thead>
   	<tr>
     <th>编号</th>
     <th>用户名</th>   
     <th>密码</th>
    <!--  <th>性别</th> 不用显示-->  
     <th>出生日期</th>
     <th>爱好</th>
    <!--  <th>学历</th>不用显示 -->
     <th>个人简历</th>
     <th>照片</th>
   </tr>
   </thead>

   <tbody>
   <?php
    while($row=mysql_fetch_assoc($re) ){
     /*echo '<tr>';
     echo '<td>'.$row['lc_id'].'</td>';
     echo '<td>'.'<a href="userDelete.php?id='.$row['lc_id'].'">'.$row['lc_title'].'</a>'.'</td>';  
     echo '<td>'.$row['lc_place'].'</td>';  
     echo '<td>'.$row['lc_intro'].'</td>';  
     echo '<td>'.$row['lc_adddate'].'</td>';  
     echo '<td>'.$row['lc_hint'].'</td>';
     echo '</tr>';  */
     echo '<tr>';
     echo '<td>'.$row['uid'].'</td>'; 
     echo '<td>'.$row['uname'].'</td>'; 
     echo '<td>'.$row['password'].'</td>'; 
     //echo '<td>'.$row['gender'].'</td>';
     echo '<td>'.$row['birthdate'].'</td>';  
     echo '<td>'.$row['hobby'].'</td>'; 
    // echo '<td>'.$row['degree'].'</td>'; 
     echo '<td>'.$row['intro'].'</td>';
     echo '<td><img src = "images/'.$row['pic'].' "width=60 height=80 alt="无头像"></td>';  
     echo '<tr>';
    }
    echo '</tbody>';
    echo '</table>';  
    $totalrows = count($row);
    echo "<table align='center'><tr><td>共有{$totalrows}条记录</td></tr></table>"   ;
   ?>